#ifndef __APP_MQTT_H_
#define __APP_MQTT_H_
#include "MQTTClient.h"
#include "unistd.h"
#include "log.h"
#include "string.h"

#define MQTT_BROKE_URL "tcp://192.168.31.41:1883"
#define MQTT_CLIENT_ID "16032534-99b6-11f0-863b-7f8d67dbe088"
#define MQTT_RECV_TOPIC "console_to_gateway"
#define MQTT_SEND_TOPIC "gateway_to_console"
#define MQTT_QOS 1
/**
 * @brief 初始化mqtt
 */
int app_mqtt_init();



/**
 * @brief 发送mqtt消息
 */
int app_mqtt_send( char *message);

/**
 * @brief 注册接收数据的回调函数
 */
int app_mqtt_register_callback(int (*callback)(char *message));


/**
 * @brief 销毁mqtt
 */
void app_mqtt_destroy();


#endif // __APP_MQTT_H_
